// ==============================================================================================
// AboutForm.cs
//
// Created by: NI, 2007.03.29
// ==============================================================================================
using System;
using System.Windows.Forms;

namespace RibbonExplorerClient
{
  // ==============================================================================================
  /// <summary>
  /// Shows the About... dialog
  /// </summary>
  // ==============================================================================================
  public partial class AboutForm : Form
  {
    // --------------------------------------------------------------------------------------------
    /// <summary>
    /// Create a dialoginstance
    /// </summary>
    // --------------------------------------------------------------------------------------------
    public AboutForm()
    {
      InitializeComponent();
    }

    // --------------------------------------------------------------------------------------------
    /// <summary>
    /// Setup the dialog
    /// </summary>
    /// <param name="sender">Sender of the event</param>
    /// <param name="e">Event arguments</param>
    // --------------------------------------------------------------------------------------------
    private void AboutForm_Load(object sender, EventArgs e)
    {
      CodePlexLink.Links.Add(new LinkLabel.Link(0, CodePlexLink.Text.Length, "http://www.codeplex.com/OfficeX"));
    }

    // --------------------------------------------------------------------------------------------
    /// <summary>
    /// Open the CodePlex project page
    /// </summary>
    /// <param name="sender">Sender of the event</param>
    /// <param name="e">Event arguments</param>
    // --------------------------------------------------------------------------------------------
    private void CodePlexLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
    {
      CodePlexLink.Links[CodePlexLink.Links.IndexOf(e.Link)].Visited = true;
      string target = e.Link.LinkData as string;
      System.Diagnostics.Process.Start(target);
    }
  }
}